#include "client.h"

model::client::client(const model::dom &node) 
{
	parse(node);
}

void model::client::parse(const model::dom &node)
{
	_name = node.find_attrib("name");
	boost::shared_ptr<model::dom> ptr(
		node.find("interpreter"));
	while(*ptr) {
		_interpreters.push_back(model::interpreter(*ptr));
		ptr = ptr->next_tag();
	}
}

void model::client::print() const
{
	cout << "Client: " << _name << endl;
	for(list<model::interpreter>::const_iterator i = _interpreters.begin();
	    i != _interpreters.end(); ++i) {
		i->print();
	}
}

